 <!doctype html>
 <html lang="zh-CN">
 <head>
   <meta charset="UTF-8">
   <link rel="stylesheet" href="__PUBLIC__/Css/Admin/common.css">
   <link rel="stylesheet" href="__PUBLIC__/Css/Admin/main.css">
   <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/Admin/content.css"  />
   <script type="text/javascript" src="__PUBLIC__/Js/Admin/jquery.min.js"></script>
   <script type="text/javascript" src="__PUBLIC__/Js/Admin/colResizable-1.3.min.js"></script>
   <script type="text/javascript" src="__PUBLIC__/Js/Admin/common.js"></script>
   
   <script type="text/javascript">
      $(function(){  
        $(".list_table").colResizable({
          liveDrag:true,
          gripInnerHtml:"<div class='grip'></div>", 
          draggingClass:"dragging", 
          minWidth:30
        }); 
        
        // 添加
        $("#btn_add").click(function(){
        	operate("__URL__/addAdvertisement");
        });
        
        // 删除
        deleteById("__URL__/deleteAdvertisement");
      });
      
   </script>
   <title>内容管理</title>
 </head>
 <body>
  <div class="container">
     <div id="search_bar" class="mt10">
       <div class="box">
          <div class="box_border">
            <div class="box_top"><b class="pl5">搜索</b></div>
            <form class="box_center pt10 pb10" action="{:U('Content/advertisementList')}" method="post">
              <table class="form_table" style="width:100%;">
                <tr>
                  <td style="width:60px;">关键字</td>
                  <td style="width:35%;">
                  	<input type="text" name="keyword" class="input-text lh25" style="width:90%;" value="{$keyWord}">
                  </td>
                  <td>
                  	<input type="submit" name="button" class="btn btn82 btn_search" value="查询"> 
                  </td>
                </tr>
              </table>
            </form>
          </div>
        </div>
    </div>
    <div class="box_bottom pb5 pt5 pr10" style="border:1px solid #dadada;border-bottom:0;margin-top:10px;">
              <div class="search_bar_btn" style="margin-left:2px;">
                 <form method="post" id="operationForm">
                 	 <input type="hidden" id="del_id" name="idList"> 
	                 <input type="button" id="btn_add" class="btn btn82 btn_add"  value="添加"> 
	                 <input type="button" id="btn_checkAll" class="btn btn82 btn_checked" value="全选"> 
       				 <input type="button" id="btn_unCheckAll" class="btn btn82 btn_nochecked" value="取消">
	       			 <input type="button" id="btn_del" class="btn btn82 btn_del" value="删除">
                 </form>
              </div>
            </div>
     <div id="table" class="mt10">
        <div class="box span10 oh">
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
                <tr>
                   <th width="5%">#</th>
                   <th width="25%">广告标题</th>
                   <th width="10%">介绍图片</th>
                   <th>链接地址</th>
                   <th width="8%">修改时间</th>
                </tr>
                <foreach name="advertisementList" item="advertisement">
                <tr class="tr">
                   <td class="td_center">
                   		<input type="checkbox" name="del_checkbox">
                   		<input type="hidden" value="{$advertisement.id}">
                   </td>
                   <td class="td_center"><a href="{:U('Content/editAdvertisement')}?id={$advertisement.id}">{$advertisement.title}</a></td>
                   <td class="td_center"><img src="__PUBLIC__/Uploads/{$advertisement.img_path}" style="width:80px;height:80px;"></td>
                   <td class="td_center">{$advertisement.link_address}</td>
                   <td class="td_center">{$advertisement.create_time}</td>
                 </tr>
                 </foreach>
              </table>
        </div>
        <div class="pages"> {$page}</div>
     </div>
   </div>
 </body>
 </html>
  